/*
 * @Author: wangliang
 * @Date: 2018-04-27
 * @description: 基本信息 --> 上市信息
*/

import { apiHttp } from '../../../apiHttp';
import Api from '../../../../api/company/comIpoController.api';
import { ComIpoDto, JsonResult } from '../../../../api/Interface';
import { CommonDto } from '../../../../service/subject/company/companyInterface';
export default {
    // 添加上市信息
    saveComIpo: async (comIpo: ComIpoDto): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.saveComIpo, comIpo);
        return res;
    },
    // 上市信息列表
    getComIpoByCompanyId: async (comIpo: CommonDto): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.getComIpoByCompanyId, comIpo);
        return res;
    },
    // 编辑上市信息
    updateComIpo: async (comIpo: ComIpoDto): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.updateComIpo, comIpo);
        return res;
    },
    // 删除上市信息
    deleteComIpoById: async (delId: number): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.deleteComIpoById, {id: delId});
        return res;
    },
};